
//
//  TextCollectionViewCell.m
//  Yanwei
//
//  Created by peter on 15/9/15.
//  Copyright (c) 2015年 DCloud. All rights reserved.
//

#import "TextCollectionViewCell.h"

@interface TextCollectionViewCell ()
//@property (weak, nonatomic) IBOutlet UILabel *textLabel;

@end

@implementation TextCollectionViewCell

- (void)setTextValue:(NSString *)textValue {
    if([_textValue isEqualToString:textValue]) {
        return;
    }
    _textValue = textValue;
    
    self.textLabel.text = _textValue;
}

- (void)setTextFont:(UIFont *)textFont {
    if(_textFont == textFont) {
        return;
    }
    _textFont = textFont;
    self.textLabel.font = _textFont;
}

- (void)setTextColor:(UIColor *)textColor {
    if(_textColor == textColor) {
        return;
    }
    _textColor = textColor;
    self.textLabel.textColor = _textColor;
}

- (void)setMarginEdgeInsets:(UIEdgeInsets)marginEdgeInsets {
    if(UIEdgeInsetsEqualToEdgeInsets(_marginEdgeInsets, marginEdgeInsets)) {
        return;
    }
    _marginEdgeInsets = marginEdgeInsets;
    self.textLabel.frame = UIEdgeInsetsInsetRect(self.bounds, _marginEdgeInsets);
    [self.textLabel updateConstraintsIfNeeded];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

@end
